<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>客户端设置第四次作业</title>
	</head>
	<body>
	</body>

	<!-- 三角形 -->
	<script type="text/javascript">
		for (var i = 0; i < 5; i++) { //打印的行数
			for (var j = 0; j < 5 - i - 1; j++) { //*前面的空格
				document.write("&nbsp");
			}
			for (var k = 0; k < i + 1; k++) { //打印每一行有多少个*
				document.write("&nbsp"); //*之间的空格
				document.write("*");
			}
			document.write("<br />")
		}
	</script>
	
	<!-- 平行四边形 -->
	<script type="text/javascript">
		for (var i = 0; i < 5; i++) { //打印行数
			for (var j = 0; j < 5 - i - 1; j++) { //*前面的空格
				document.write("&nbsp");
			}
			for (var k = 0; k <= j + i; k++) { //打印列数
				document.write("*" + "&nbsp&nbsp&nbsp&nbsp");
			}
			document.write("<br />")
		}
	</script>
	
										<!-- 179000910-陈润强 -->
	<!-- 菱形 -->
	<script type="text/javascript">
		for (var i = 0; i < 3; i++) {
			for (var j = 3; j > i; j--) { //*前面的空格
				document.write("&nbsp&nbsp");
			}
			for (var k = 0; k < 2 * i + 1; k++) {
				document.write("&nbsp");
				document.write("*");
			}
			document.write("<br />");
		}

		for (var i = 2; i > 0; i--) {
			for (var j = 3; j >= i; j--) { //*前面的空格
				document.write("&nbsp&nbsp");
			}
			for (var k = 0; k < 2 * i - 1; k++) {
				document.write("&nbsp");
				document.write("*");
			}
			document.write("<br />")
		}
	</script>
</html>
